package com.ruoyi.quartz.task;

import com.ruoyi.system.service.JWMajorService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("jwMajorTask")
public class JWMajorTask {
    private static final Logger log = LoggerFactory.getLogger(JWMajorTask.class);

    @Autowired
    private JWMajorService jwMajorService;

    public void syncMajorData() {
        try {
            log.info("【1/3】开始同步专业建设数据：准备从数据源获取数据");
            
            jwMajorService.syncAll();
            
            log.info("【3/3】专业建设数据同步完成");
        } catch (Exception e) {
            log.error("同步失败", e);
        }
    }
}